<%@ page import="java.util.*" %>


<jsp:useBean id="custAcct" class="se2.Customer" scope="request"/>
<jsp:setProperty name="custAcct" property="*"/>

	
<% 
	
	if (custAcct.addCustomerAccount())
	{
		out.println("Customer Added");
%>
			
		<jsp:forward page="viewCustomerAccount.jsp"/>

<%
	
	}
	else
	{
		out.println("Failed to Create Customer Account");
		String msg = "";
		msg += custAcct.getMsg();
		String s = "error.jsp?&url=addCustomerAccount.jsp";
		if (msg.length() != 0)
		{
			s += "&msg=" + msg;
		}
%>

				<jsp:forward page="<%= s %>" />

<%
	}
%>
